<!-- 案例二 -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>   
    //计算员工工资：底薪 + 绩效
        
        //确定员工的底薪，返回底薪固定，绩效动态的函数
        function makeSalary (base) {
            return function (performance) {
                return base + performance;
            }
        }

        let salaryLevel1 = makeSalary(12000);
        let salaryLevel2 = makeSalary(15000);
        
        console.log(salaryLevel1(2000));
        console.log(salaryLevel2(3000));
    </script>
</body>
</html>
